project(PlaneGame)
cmake_minimum_required(VERSION 2.8)

# Add global definitions
add_definitions("-Wall")
include_directories(${SDL2_INCLUDE_DIR})

if (WIN32)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows -Dmain=SDL_main")
endif()

add_executable(planegame main.cpp)
install(TARGETS planegame DESTINATION bin)
if (UNIX)
	target_link_libraries(planegame SDL2main SDL2 SDL2_image SDL2_ttf)
elseif (WIN32)
	target_link_libraries(planegame mingw32 SDL2main SDL2 SDL2_image SDL2_ttf)
endif()